//
//  NSURLSession+cagegory.h
//  CCKit
//
//  Created by tucici on 2019/4/4.
//  Copyright © 2019 tucici. All rights reserved.
//


#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSURLSession (cagegory)
/**
 初始化
 
 @param Obj session的代理对象
 @return NSURLSession
 */
+ (NSURLSession *)sessionWithDelegate:(id)Obj;

/**
 上传文件
 
 @param request NSURLRequest
 @param para 请求的参数
 @param datas 文件，以二进制形式上传
 @return NSURLSessionUploadTask
 */
- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSMutableURLRequest *)request para:(NSDictionary *)para data:(NSArray < NSData *>*)datas;

/// 上传文件,base64
- (NSURLSessionUploadTask *)uploadBase64WithRequest:(NSMutableURLRequest *)request para:(NSDictionary *)para data:(NSArray < NSData *>*)datas;
@end

NS_ASSUME_NONNULL_END
